from django.http import HttpResponse
 
from TestModel.models import Test
 
# 数据库操作
def testdb(request):
	# add
    # test1 = Test(name='luna')
    # test1.save()

    # 删除ID为1
    # test1 = Test.objects.get(id=1)
    # test1.delete()
    # 另外一种删除方式
    # Test.objects.filter(id=2).delete()

    # 删除所有数据
    # Test.objects.all().delete()
    return HttpResponse("<p>数据添加成功！</p>")
